Ditto syncs and queries documents through a combination of collection names and document identifiers (_id
). A collection is a grouping of documents, like tables in a relational database system but far simpler and more flexible.
cars
collection contain fields 'make'
, 'model'
, and 'year'
— structural uniformity is not mandatory.
There is no limit to the number of collections you can have in your data model, so create as many collections as you need.
cars
collection once executed.
COLLECTION
keyword followed by a type definition. A type definition expresses the data types for the fields.
For example, here querying is against the cars
collection with a field properties
of data type MAP
: